<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Document</title>
    <script src="jquery-3.3.1.min.js"></script>
  </head>
  <body>
    <div class="nav">我是nav div</div>
    <script>
      console.log($(".nav"));
    </script>
  </body>
</html>